#!/bin/bash

#定义关联数组
declare -A ass_array;
ass_array=([IMB]="S5" [apple]="xX");

echo ${ass_array[IMB]};
echo ${ass_array[apple]};
echo ${ass_array[ibm]};
echo "---------------------------------";
echo

declare -A test_array;
test_array[apple]="100 dollars";
test_array[orange]="150 dollars";

echo ${test_array[apple]};
echo ${test_array[orange]};
echo "---------------------------------";
echo 

echo ${!ass_array[*]};
echo ${!test_array[@]};

#普通数组
general_arr=(1 2 3);
echo ${!general_arr[*]};
